<?php
include("../inc/conn.inc");
include("../inc/search_page.php");
$hover=3;
$url="search.php";
$thepage=$_GET['page']?$_GET['page']:1;
$maxpage=20;
$_GET[subject] = htmlspecialchars($_GET[subject]);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>求购<?=$_GET[subject]?>，求购<?=$_GET[subject]?>产品列表，最新求购，产品求购搜索</title>
<link href="/css/body.css" rel="stylesheet" type="text/css" />
<link href="/css/link.css" rel="stylesheet" type="text/css" />
<link href="/css/head_1.css" rel="stylesheet" type="text/css" />
<link href="/Buy/css/list.css" rel="stylesheet" type="text/css" />
<link href="/css/foot.css" rel="stylesheet" type="text/css" />
</head>
<body>
<?php include("../inc/head_top.php")?>
<?php include("../inc/menu_2.php")?>
<div id="mian" class="topside6 side">
<div class="title">您所在的位置：<a href="/">首页</a> >> 求购搜索 >> <?=$_GET[subject]?></div>
<div class="onl"></div>
</div>
<div id="mian" class="topside6  side">
<div class="title1 size14 b"></div>
<div align="center">
<script type="text/javascript">/*960*90，加盟首页-创建于2011-11-9*/ var cpro_id = 'u672448';</script><script src="http://cpro.baidu.com/cpro/ui/c.js" type="text/javascript"></script>
<br /><br /><br />
<script type="text/javascript"><!--
google_ad_client = "pub-2924453545159453";
/* 728x90, 创建于 10-12-28 */
google_ad_slot = "0069335756";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<div class="onl"></div>
</div>
<div id="mian" class="topside6">
  <div class="onl"></div>

<div class="leftmain">
<div>
<DIV class="zzb3 side">
<DIV style="width:120px;float:left;height:25px;line-height: 25px;" align="center">图片</DIV>
<DIV style="width:276px;float:left;height:25px;line-height: 25px;" align="center">求购产品信息</DIV>
<DIV style="width:100px;float:left;height:25px;line-height: 25px;" align="center">
<form method="post" action="">
<select name="city" id="city"  onChange="javascript:submit()">
<option value="">--选择省份--</option>
<?php
          $result = mysql_query("select id,city_name from city where city_id=0 order by order_name asc");    
          while($res = mysql_fetch_array($result)){    
          ?>    
          <option value="<?=$res['id']?>"><?=$res['city_name']?></option> 
          <?php }?>  
</select>
</form></DIV>
<DIV style="width:90px;float:left;height:25px;line-height: 25px;" align="center">单价/起定量</DIV>
<DIV style="width:80px;float:left;height:25px;line-height: 25px;" align="center">会员类型</DIV>
</DIV>
<?php
if($_POST[city]){
$sqls=" and member.m_pro='$_POST[city]'";
}
$kw=htmlspecialchars(trim($_GET['subject']));

$rs=@mysql_query("select buy.id,buy.b_title,buy.picture,buy.b_addtime,buy.b_info,buy.b_price,buy.b_minorder,member.m_type,member.pro,member.city from buy inner join member on (buy.member_id=member.id) where  (buy.b_title like '%".$kw."%' ) and buy.b_sh=1 ".$sqls." order by buy.b_addtime desc limit ".($thepage-1)*$maxpage.",$maxpage");
while($row=@mysql_fetch_array($rs)){
?>
<DIV class=zzb4 id=Info6197>
<DIV class=zzb4-2>
<a href="/buy/<?=$row['id']?>.html" target="_blank">
<?php if(trim($row[picture])){?>
<img src="/upfile/<?=$row[picture]?>"  border="0" width="91" height="83"/>
<? //=imgstr("http://www.sandib2b.cn/upfile/$row[picture]","91","83")?>
<?php }else{?>
<img src="/images/prono88.gif" width=91 height=83 border="0" />
<?php }?></a></DIV>
<DIV class=zzb4-3>
<DIV class=zzb4-3-1><a href="/buy/<?=$row['id']?>.html" target="_blank"><?=str_replace("$_GET[subject]","<font color='red'>$_GET[subject]</font>",mb_substr($row[b_title],0,16,'utf-8'))?></a><SPAN 
style="FONT-WEIGHT: normal" class="size10 fontgray"><?=date("Y-m-d",strtotime($row[b_addtime]))?></SPAN></DIV>
<DIV class=zzb4-3-Time></DIV>
<DIV class=zzb4-3-2><?=mb_substr(strip_tags($row[b_info]),0,80,'utf-8')?></DIV>
<DIV class=zzb4-3-3>
<DIV style="FLOAT: right; COLOR: #999999;font-weight: lighter;">[<?=$row[pro]?>-<?=$row['city']?>] </DIV></DIV></DIV>
<DIV class=zzb5>
<DIV style="TEXT-ALIGN: center" class="fontred size14 b"><?=$row[b_price]?></DIV>
<div class="size11 fontgray"><?=$row[b_minorder]?></div></DIV>
<DIV class=zzb52>
<div style="COLOR: #999999;font-weight: lighter;">
<?php if($row[m_type]==6){?>
<img src="/images/member1.gif"/><?php }?></div>
</DIV>
<DIV class=zzb53>
  <div class="ms"></div>
  <div class="ms"><a href="/buy/<?=$row['id']?>.html" target="_blank"><img src="/images/list02.gif" border="0" /></a></div>
</DIV>
<div class="onl"></div>
</DIV>
<?php }
$rs2=@mysql_query("select count(id) from buy where b_sh=1 and (b_title like '%".trim($_GET[subject])."%') ".$sqls);
$totalrecord=@mysql_result($rs2,0); 
$totalpage=ceil($totalrecord/$maxpage);
@mysql_free_result($rs2);
?>
</div>
<div class="onl"></div>

<!--page-->
<div class="page">
<div class="pageleft">
<ul>
<?php pages($thepage,$totalpage,$maxpage,4);?>
</ul>
</div>
<div class="pageright">
<form name="pageform" method="post" action="" onSubmit="return onCheckPage()"> 
共<?=$totalpage?>页　到
<input type="text" name="page" class="input-txt" size="5" maxlength="5">页
<input type="submit" value="确定" class="but">
</form>
<script language="javascript"> 
function onCheckPage(){ 
var page = parseInt(document.pageform.page.value); 
if(isNaN(page)){ 
alert("Please enter the number (1,<?=$totalpage?>)"); 
return false; 
}
}
</script>
  </div>
<div class="onl"></div>
</div>
<!--page end-->
</div>
<div class="rightmain">
  <div class="right side">
  <div class="title b">黄金展位供应商</div>
  <div style="width:180px; margin-top:20px;" align="center"><script type="text/javascript"> /*160*600，创建于2010-8-4*/ var cpro_id = 'u136291';</script>
<script type="text/javascript" src="http://cpro.baidu.com/cpro/ui/c.js"></script>
</div>
  </div>
</div>
<div class="onl"></div>
</div>
<div id="mian">
<br />
<script type="text/javascript">/*960*90，加盟首页-创建于2011-11-9*/ var cpro_id = 'u672448';</script><script src="http://cpro.baidu.com/cpro/ui/c.js" type="text/javascript"></script>
<br /><br />
</div>
<div id="mian" class="topside6  sideyellow backyellow">
<div class="title1 size14 b">
<div class="scbox">
<div><a href="/supply">产品</a>　<a href="/buy">求购</a>　<a href="/company">公司</a></div>
 <div>
  <form id="form1" name="form1" method="get" action="/buy/search.php" onsubmit="return listfoot()">
    <label>
      <input name="subject" id="subject" type="text" class="input" />
    </label>
    <label>
    <input name="Submit2" type="submit" class="butt" id="form1" value="产品搜索" />
    </label>
  </form>
  </div>
</div>
</div>
</div>
<?php include("../inc/foot.php");?>
</BODY>
</HTML>

<script language="javascript">
function $(id){
return document.getElementById(id);
}
function listfoot(){
if($("subject").value==""){
alert("请输入您要搜索的关键字");
$("subject").focus();
return false;
}
}
</script>
<script type="text/javascript">/*120*270，创建于2010-12-18*/ var cpro_id = 'u319758';</script><script src="http://cpro.baidu.com/cpro/ui/f.js" type="text/javascript"></script>